<%@ page session="false" language="java" contentType="text/html; charset=UTF-8" trimDirectiveWhitespaces="true" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include.inc.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>运行养护</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

    <!-- bootstrap & fontawesome -->
    <link rel="stylesheet" href="${contextPath}/resources/assets/css/bootstrap.css" />
    <link rel="stylesheet" href="${contextPath}/resources/assets/css/font-awesome.css" />
    <link rel="stylesheet" href="${contextPath}/resources/assets/css/jquery-ui.css" />

    <!-- page specific plugin styles -->
	<link rel="stylesheet" href="${contextPath}/resources/assets/css/ui.jqgrid.css" />
    <!-- text fonts -->
    <link rel="stylesheet" href="${contextPath}/resources/assets/css/ace-fonts.css" />

    <!-- ace styles -->
    <link rel="stylesheet" href="${contextPath}/resources/assets/css/ace.css" class="ace-main-stylesheet" id="main-ace-style" />

    <!--[if lte IE 9]>
			<link rel="stylesheet" href="${contextPath}/resources/assets/css/ace-part2.css" class="ace-main-stylesheet" />
		<![endif]-->

    <!--[if lte IE 9]>
		  <link rel="stylesheet" href="${contextPath}/resources/assets/css/ace-ie.css" />
		<![endif]-->

    <!-- inline styles related to this page -->
    <link rel="stylesheet" href="${contextPath}/resources/css/js/iframe.css" />
    <link rel="stylesheet" href="${contextPath}/resources/css/jikong.css">
	
    
    <!-- ace settings handler -->
    <script src="${contextPath}/resources/assets/js/ace-extra.js"></script>
    <script type="text/javascript">
       var contextPath = '${contextPath}';
   	</script>

    <!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->

    <!--[if lte IE 8]>
		<script src="${contextPath}/resources/assets/js/html5shiv.js"></script>
		<script src="${contextPath}/resources/assets/js/respond.js"></script>
		<![endif]-->

    <style>
        .seari_logo {
            padding-left: 10px;
            color: #ffffff;
            font-size: 20px;
            text-shadow: none;
            font-weight: 600;
            line-height: 80px;
        }
        
        .seari_logo:hover,
        .seari_logo:focus {
            color: #ffffff;
            text-decoration: none;
        }
        
        .navbar {
            min-height: 80px;
            background: url('${contextPath}/resources/img/navbar-bg.png') repeat-x;
        }
        
        .navbar .navbar-nav > li {
            border: 0px solid rgba(0, 0, 0, 0);
        }
        
        .navbar .navbar-nav > li > a {
            padding-top: 18px;
        }
        
        @media only screen and (max-width: 991px) {
            .navbar-nav {
                float: left;
                margin: 0;
            }
            .navbar-nav > li {
                float: left;
            }
            .navbar-menu-min .navbar-nav > li > a > .menu-title {
                /*display: none;*/
            }
            .seari_logo,.seari_user {
                display: none;
            }
            .navbar-menu{
                background-color: #607990;
            }
        }
        
        .navbar-menu {
            padding-top: 20px;
            
        }
        
        .menu-title {
            font: 16px/1.5 'Microsoft YaHei', SimSun;
        }
        
        .page-content {
            font: 12px/20px "Microsoft YaHei";
        }
        
        .sidebar {
            font-family: "Microsoft YaHei";
        }
        
        .breadcrumb {
            font-family: "Microsoft YaHei";
        }
        /****box design style*****/
        
        
        
        @import "${contextPath}/resources/css/js/iframe.css";
        @import "${contextPath}/resources/css/jikong.css";
    </style>
    <style>
            .wrapper{
                width: auto;
                background: white;
                overflow:hidden;
                padding-top:50px;
            }
            .drag-container{

            }
            .drag-bg{
                width: 3216px;
                height:432px;
                background-repeat: no-repeat;
                background-size:contain;
            }
            .mainImg{
                width: 3216px;check
                height:432px;
                margin:0 auto;
                display: block;
            }
            .arrow{
                
            }
            .popover{
                border-radius:10px;
                /*background-color: transparent;*/
                border: none;
                /*filter:alpha(opacity=50);  
                    -moz-opacity:0.5;  
                    -khtml-opacity: 0.5;  
                    opacity: 0.5;*/
            }
            .popover-content{
                
            }
        </style>
</head>
<body class="no-skin">
	<jsp:include page="index.jsp" flush="true" />
	<!-- /section:basics/navbar.layout -->
   <div class="main-container" id="main-container">
        <!-- #section:左侧树菜单 basics/sidebar -->
        <div id="sidebar" class="sidebar responsive">
            <script type="text/javascript">
                try {
                    ace.settings.check('sidebar', 'fixed')
                } catch (e) {}
            </script>

            <ul class="nav nav-list">

                <li class="active open">
                    <a href="#" class="dropdown-toggle">
                        <i class="menu-icon fa fa-tag"></i>
                        <span class="menu-text"> 控制管理 </span>
                    </a>
                    <b class="arrow"></b>
                    
                     <ul class="submenu">
                          	<li class="active">
                          		<a href="jkgl">
                          			控制方式一
                          		</a>
                          	</li>
                          	<li class="">
                          		<a href="sbxk">
                          			控制方式二
                          		</a>
                          	</li>
                      </ul>
                </li>
                 <li class="">
                    <a href="#" class="dropdown-toggle">
                        <i class="menu-icon fa fa-tag"></i>
                        <span class="menu-text"> 养护维修 </span>
                    </a>
                    <b class="arrow"></b>
                    
                    <ul class="submenu">
                    	<li class="">
                    	    <a href="sbgl">
                    	        <i class="menu-icon fa fa-caret-right"></i>设备管理
                    	    </a>
                    	    <b class="arrow"></b>
                    	</li>
                        <li class="">
                            <a href="" class="dropdown-toggle">
                                <i class="menu-icon fa fa-caret-right"></i> 日常保养
                            </a>
                            <b class="arrow"></b>
                            <ul class="submenu">
                            	<li class="">
                            		<a href="byjh">
                            			保养计划
                            		</a>
                            	</li>
                            	<li class="active">
                            		<a href="zxjh">
                            			执行计划
                            		</a>
                            	</li>
                            	<li class="">
                            		<a href="byjl">
                            			保养记录
                            		</a>
                            	</li>
                            </ul>
                        </li>
                        <li class="">
                            <a href="" class="dropdown-toggle">
                                <i class="menu-icon fa fa-caret-right"></i> 设备维修
                            </a>
                            <b class="arrow"></b>
                            <ul class="submenu">
                            	<li class="">
                            		<a href="wxsq">
                            			维修申请
                            		</a>
                            	</li>
                            	<li class="">
                            		<a href="zxwx">
                            			执行维修
                            		</a>
                            	</li>
                            	<li class="">
                            		<a href="wxjl">
                            			维修记录
                            		</a>
                            	</li>
                            </ul>
                        </li>
                    </ul>
                </li>  
                <li class="">
                    <a href="bpbj">
                        <i class="menu-icon fa fa-tag"></i>
                        <span class="menu-text"> 备品备件 </span>
                    </a>
                    <b class="arrow"></b>
                </li>
                </ul>
            <!-- /.nav-list -->
            <!-- #section:basics/sidebar.layout.minimize -->
            <div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
                <i class="ace-icon fa fa-angle-double-left" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
            </div>

            <!-- /section:basics/sidebar.layout.minimize -->
            <script type="text/javascript">
                try {
                    ace.settings.check('sidebar', 'collapsed')
                } catch (e) {}
            </script>
        </div>
       <div class="main-content">
            <!-- #section:面包屑导航路径 basics/content.breadcrumbs -->
            <div class="breadcrumbs" id="breadcrumbs">
                <script type="text/javascript">
                    try {
                        ace.settings.check('breadcrumbs', 'fixed')
                    } catch (e) {}
                </script>

                <ul class="breadcrumb">
                    <li>
                        <i class="ace-icon fa fa-home home-icon"></i>
                        <a href="#">运行养护</a>
                    </li>
                    <li>
                        <a href="#">控制管理</a>
                    </li>
                    <li class="active">控制方式一</li>
                </ul>
                <!-- /.breadcrumb -->
            </div>
            <!-- /section:面包屑导航路径 basics/content.breadcrumbs -->
            
            <!-- PAGE CONTENT BEGINS -->
            <div class="page-content">
            <div class="wrapper">
            <div class="drag-bg" id="slide-bg">
                <img src="resources/PicFile/bj.jpg" class="mainImg" id="mainImg">
                    <div class="popovers" style="left:51px;top:0;width:126px;height:162px;position:absolute;cursor:pointer;">
                        <a title="风机1" style="width:126px;height:162px;display:block;"><img src="resource/PicFile/fengji1.gif" style="height:162px;" class="fengji1"></a>
                    </div>
                    <div class="popovers" style="left:158px;top:0;width:126px;height:162px;position:absolute;cursor:pointer;">
                        <a title="风机2" style="width:126px;height:162px;display:block;"><img  src="resources/PicFile/fengji2.gif" style="height:162px;" class="fengji2"></a>
                    </div>
                    <div class="popovers" style="left:2929px;top:-1px;width:127px;height:164px;position:absolute;cursor:pointer;">
                        <a title="风机3" style="width:126px;height:162px;display:block;"><img  src="resources/PicFile/fengji3.gif" style="height:160px;" class="fengji3"></a>
                    </div>
                    <div class="popovers" style="left:3033px;top:-1px;width:127px;height:164px;position:absolute;cursor:pointer;">
                        <a title="风机4" style="width:126px;height:162px;display:block;"><img  src="resources/PicFile/fengji4.gif" style="height:160px;" class="fengji4"></a>
                    </div>
                    <div class="popovers" style="left:1580px;top:14px;width:171px;height:21px;position:absolute;cursor:pointer;" >
                        <a title="投料口" style="width:126px;height:162px;display:block;"><img src="resources/PicFile/touliaokou.gif" style="height:21px;" class="touliaokou"></a>
                    </div>
                   
                    

                    <!--<area shape="rect" coords="291,365,311,392" onclick="alert('shuibeng1')">
                    <area shape="rect" coords="347,365,358,392" onclick="alert('shuibeng2')">
                    <area shape="rect" coords="796,365,816,392" onclick="alert('shuibeng3')">
                    <area shape="rect" coords="848,365,868,392" onclick="alert('shuibeng4')">
                    <area shape="rect" coords="1294,365,1315,392" onclick="alert('shuibeng5')">
                    <area shape="rect" coords="1326,365,1369,392" onclick="alert('shuibeng6')">
                    <area shape="rect" coords="1797,365,1818,392" onclick="alert('shuibeng7')">
                    <area shape="rect" coords="1854,365,1869,392" onclick="alert('shuibeng8')">
                    <area shape="rect" coords="2305,365,2321,392" onclick="alert('shuibeng9')">-->
                    <!-- <div class="popovers" style="left:2306px;top:362px;width:19px;height:33px;position:absolute;cursor:pointer;">
                        <img src="resources/PicFile/shuibeng9.gif" style="height:33px;" class="shuibeng9">
                    </div> -->
                    <div class="popovers" style="left:1800px;top:365px;width:18px;height:30px;position:absolute;cursor:pointer;">
                        <a title="水泵9" style="width:18px;height:30px;display:block;"><img src="resources/PicFile/shuibeng9.gif" style="height:33px;" class="shuibeng9"></a>
                    </div>
                    <!--<area shape="rect" coords="2357,365,2387,392" onclick="alert('shuibeng10')">-->
                    <!-- <div class="popovers" style="left:2355px;top:364px;width:22px;height:33px;position:absolute;cursor:pointer;">
                        <img src="resources/PicFile/shuibeng10.gif" style="height:33px;" class="shuibeng10">
                    </div> -->
                    <div class="popovers" style="left:1854px;top:365px;width:18px;height:29px;position:absolute;cursor:pointer;">
                        <a title="水泵10" style="width:18px;height:30px;display:block;"><img src="resources/PicFile/shuibeng10.gif" style="height:33px;" class="shuibeng10"></a>
                    </div>
                
                    <!--<area shape="rect" coords="2810,365,2826,392" onclick="alert('shuibeng11')">
                    <area shape="rect" coords="2857,365,2878,392" onclick="alert('shuibeng12')">-->              

                    <!--<area shape="rect" coords="1723,63,1797,85" onclick="alert('baiyechuang')">-->
                    <div class="popovers" style="left:1723px;top:63px;width:74px;height:22px;position:absolute;cursor:pointer;">
                        <a title="百叶窗" style="width:74px;height:22px;display:block;"><img src="resources/PicFile/baiyechuang.gif" style="width:74px;height:22px;" class="baiyechuang"></a>
                    </div>
                    
                    <!--<area shape="rect" coords="1419,25,1484,38" onclick="alert('jinggai')">-->
                    <div class="popovers" style="left:1415px;top:-26px;width:75px;height:67px;position:absolute;cursor:pointer;">
                        <a title="井盖" style="width:75px;height:67px;display:block;"><img src="resources/PicFile/jinggai.gif" style="height:67px;" class="jinggai"></a>
                    </div>
                
                    <div class="popoversVideo" style="left:1797px;top:61px;width:20px;height:13px;position:absolute;cursor:pointer">
                    	<a title="固定摄像头" style="width:20px;height:13px;display:block;"></a>
                    </div>
                    <div class="popoversVideoControl" style="left:1676px;top:189px;width:20px;height:27px;position:absolute;cursor:pointer">
                    	<a title="移动摄像头" style="width:20px;height:27px;display:block;"></a>
                    </div>
                    <div class="popoversView1" style="left:1353px;top:257px;width:16px;height:27px;position:absolute;cursor:pointer">
                    	<a title="可燃气体检测仪" style="width:16px;height:27px;display:block;"></a>
                    </div>
                    <div class="popoversView2" style="left:1716px;top:257px;width:18px;height:32px;position:absolute;cursor:pointer">
                    	<a title="氧检仪" style="width:18px;height:32px;display:block;"></a>
                    </div>
                   	<div class="popoversView3" style="left:2706px;top:264px;width:18px;height:22px;position:absolute;cursor:pointer">
                   		<a title="温湿度计" style="width:18px;height:22px;display:block;"></a>
                   	</div>
                    <div class="popoversSwitch" style="left:217px;top:287px;width:22px;height:20px;position:absolute;cursor:pointer">
                    	<a title="灯开关" style="width:22px;height:20px;display:block;"><img src="resources/PicFile/dengswitch.png" style="height:20px;"></a>
                    </div>
                    <div style="left:31px;top:138px;width:3153px;height:30px;position:absolute;">
                        <img src="resources/PicFile/guang2.gif" style="height:30px;position:absolute;" class="guang2">
                        <img src="resources/PicFile/guang2.gif" style="height:30px;margin-left:400px;position:absolute;" class="guang3">
                        <img src="resources/PicFile/guang2.gif" style="height:30px;margin-left:800px;position:absolute;" class="guang2">
                        <img src="resources/PicFile/guang2.gif" style="height:30px;margin-left:1200px;position:absolute;" class="guang2">
                        <img src="resources/PicFile/guang2.gif" style="height:30px;margin-left:1600px;position:absolute;" class="guang2">
                        <img src="resources/PicFile/guang2.gif" style="height:30px;margin-left:2000px;position:absolute;" class="guang2">
                        <img src="resources/PicFile/guang2.gif" style="height:30px;margin-left:2400px;position:absolute;" class="guang3">
                        <img src="resources/PicFile/guang2.gif" style="height:30px;margin-left:2800px;position:absolute;" class="guang2">
                    </div>
            </div>
        </div>
        <div class="row">
                <div class="col-xs-12">
                	<table id="grid-table"></table>

					<div id="grid-pager"></div>

					<script type="text/javascript">
						var $path_base = "..";//in Ace demo this will be used for editurl parameter
				    </script>
				    </div>
			  </div>
                <!-- /.wrapper -->
            </div>
            <!-- /.page-content -->
        </div>
        <!-- /.main-content -->
    </div>
    <!-- /.main-container -->

    <!-- basic scripts -->

    <!--[if !IE]> -->
    <script type="text/javascript">
        window.jQuery || document.write("<script src='${contextPath}/resources/assets/js/jquery.js'>" + "<" + "/script>");
    </script>

    <!-- <![endif]-->

    <!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='${contextPath}/resources/assets/js/jquery1x.js'>"+"<"+"/script>");
</script>
<![endif]-->
    <script type="text/javascript">
        if ('ontouchstart' in document.documentElement) document.write("<script src='${contextPath}/resources/assets/js/jquery.mobile.custom.js'>" + "<" + "/script>");
    </script>
    <script src="${contextPath}/resources/assets/js/bootstrap.js"></script>
    
    <script src="${contextPath}/resources/assets/js/date-time/bootstrap-datepicker.js"></script>
	<script src="${contextPath}/resources/assets/js/jqGrid/jquery.jqGrid.js"></script>
	<script src="${contextPath}/resources/assets/js/jqGrid/i18n/grid.locale-cn.js"></script>

    <!-- page specific plugin scripts -->

    <!-- ace scripts -->
    <script src="${contextPath}/resources/assets/js/ace/elements.scroller.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/elements.colorpicker.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/elements.fileinput.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/elements.typeahead.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/elements.wysiwyg.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/elements.spinner.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/elements.treeview.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/elements.wizard.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/elements.aside.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/ace.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/ace.ajax-content.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/ace.touch-drag.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/ace.sidebar.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/ace.sidebar-scroll-1.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/ace.submenu-hover.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/ace.widget-box.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/ace.settings.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/ace.settings-rtl.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/ace.settings-skin.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/ace.widget-on-reload.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/ace.searchbox-autocomplete.js"></script>
    <script src="${contextPath}/resources/assets/js/ace/ace.hover-dropdown.js"></script>
    <script src="${contextPath}/resources/assets/js/jquery-ui.js"></script>
    <script src="${contextPath}/resources/layer/layer.js"></script>
    <!-- inline scripts related to this page -->
    
     <script type="text/javascript">
        /* var no=document.getElementsByClassName("div1");
        for(var i=0;i<no.length;i++){
            var w=no[i].offsetWidth;
            var h=w*675/1200 - 160;
            no[i].style.height=h+"px";
        }
        */
        $("#slide-bg").draggable({
            axis:"x",
            containment:[-1500,-1500,500,500]
        });
        /* var checked=null; */
        var deviceNow;
        var speed=5;
        var fjtype;
        var sbtype;
        var ywlevel;
        //状态0为关，1为打开
        var switchState={
            guang3:0,
            guang2:1,
            baiyechuang:1,
            fengji1:0,
            fengji2:1,
            fengji3:0,
            fengji4:0,
            jinggai:1,
            touliaokou:1,
            shuibeng9:1,
            shuibeng10:0
        };
        var values={
        	wendu:25,
        	shidu:20,
        	yangqi:30,
        	keran:0.2
        }
        var fun;//获取一个方法
		loaddata();
         //加载数据
        function loaddata(){
    		$.ajax({
    			url : "loadData",
    			cache : false,
    			async : false,
    			success : function(result) {
    				for(var i=0;i<result.length;i++){
    					if(result[i].opcname=="DEMO.temp1"){
    						values.wendu=Math.round(result[i].opcvalue*100)/100;
    					}
    					if(result[i].opcname=="DEMO.wet1"){
    						values.shidu=Math.round(result[i].opcvalue*100)/100;
    					}
    					if(result[i].opcname=="DEMO.O2"){
    						values.yangqi=Math.round(result[i].opcvalue*100)/100;
    					}
    					if(result[i].opcname=="DEMO.krqt"){
    						values.keran=Math.round(result[i].opcvalue*100)/100;
    					}
    					if(result[i].opcname=="DEMO.level"){
    						ywlevel=Math.round(result[i].opcvalue*100);
    					}
    					if(result[i].opcname=="DEMO.led1_op"){
    						if(result[i].opcvalue=="false"){
    							switchState.guang2=0;
    						}else{
    							switchState.guang2=1;
    						}
    					}
                        if(result[i].opcname=="DEMO.led3_op"){
    						if(result[i].opcvalue=="false"){
    							switchState.guang3=0;
    						}else{
    							switchState.guang3=1;
    						}
    					}
    					if(result[i].opcname=="DEMO.byc_op"){
    						if(result[i].opcvalue=="false"){
    							switchState.baiyechuang=0;
    						}else{
    							switchState.baiyechuang=1;
    						}
    					}
    					if(result[i].opcname=="DEMO.fan_run"){
    						if(result[i].opcvalue=="false"){
    							switchState.fengji2=0;
    						}else{
    							switchState.fengji2=1;
    						}
    					}
    					if(result[i].opcname=="DEMO.jg_op"){
    						if(result[i].opcvalue=="false"){
    							switchState.jinggai=0;
    						}else{
    							switchState.jinggai=1;
    						}
    					}
    					if(result[i].opcname=="DEMO.tlk_op"){
    						if(result[i].opcvalue=="false"){
    							switchState.touliaokou=0;
    						}else{
    							switchState.touliaokou=1;
    						}
    					}
    					if(result[i].opcname=="DEMO.pump1_run"){
    						if(result[i].opcvalue=="false"){
    							switchState.shuibeng9=0;
    						}else{
    							switchState.shuibeng9=1;
    						}
    					}
    					if(result[i].opcname=="DEMO.fan_szd"){
    						if(result[i].opcvalue=="false"){
    							fjtype="手动";
    						}else{
    							fjtype="自动";
    						}
    					}
    					if(result[i].opcname=="DEMO.pump_szd"){
    						if(result[i].opcvalue=="false"){
    							sbtype="手动";
    						}else{
    							sbtype="自动";
    						}
    					}
    				}
    				
    			}
    		
    		});
    	}
        
        //状态初始化
        for(var p in switchState){
            if(switchState[p]==1){
                if(p=="guang2"||p=="fengji1"||p=="fengji2"||p=="fengji3"||p=="fengji4"||p=="shuibeng9"||p=="shuibeng10"||p=="guang3"){
                    $('.'+p).attr("src","resources/PicFile/"+p+".gif");
                    $('.'+p).show();
                }else{
                    $('.'+p).attr("src","resources/PicFile/"+p+".gif");
                }
            }else{
                if(p=="guang2"||p=="fengji1"||p=="fengji2"||p=="fengji3"||p=="fengji4"||p=="shuibeng9"||p=="shuibeng10"||p=="guang3"){
                    $('.'+p).hide();
                }else{
                    $('.'+p).attr("src","resources/PicFile/"+p+".png");
                }
            }
        }
		function popoversVideoClick(){
			layer.open({
				title:'监视摄像',
            	type:2,
            	shade:0,
            	area:['550px','350px'],
            	content:['gdxj','no']
            });
		}
        $(".popoversVideo").on("click",function(){
        	popoversVideoClick();
        });
        
        
        function popoversVideoControlClick(){
        	layer.open({
				title:'移动小车相机',	
            	type:2,
            	shade:0,
            	area:['800px','500px'],
            	content:['ydxj','no']
            });
            $("#showSlider").on("click",function(){
            	/* $(this).popover({
            		html:true,
            		animation:true,
            		placement:"top",
            		content:"<div>show slider</div>"
            	}) */
            	layer.open({
            		type:4,
            		area:['300px','50px'],
            		title:'请选择相机速度',
            		moveType:1,
            		color:'#000000',
            		shade:0,
            		content:['<div id="slider" style="margin:20px;" class="ui-slider-green"></div>','#showSlider','#78BA32'],
            		tips:[1,'#FFFFFF']
            	});
            	
            	$("#slider").slider({
            		value:speed,
            		range:"min",
            		max:7,
            		animate:true,
            		slide:function(ecent,ui){
            			speed = ui.value;
            		}
            	})
            });
        }
        $(".popoversVideoControl").on("click",function(){
            popoversVideoControlClick();
        })
        
        
        function popoversView1Click(){
        	 $(".popoversView1").popover({
                html:true,
                animation:false,
                content:"<div>可燃气体浓度:<span id='keran'>20</span>%</div>"
            }).popover('show');
            $("#keran").html(values.keran);
            setTimeout(function(){
            	$(".popoversView1").popover("destroy");
            },2000);
        }
        $(".popoversView1").on("click",function(){
            popoversView1Click();
        })
        
        function popoversView2Click(){
        	$(".popoversView2").popover({
                html:true,
                animation:false,
                content:"<div>氧气含量:<span id='yangqi'>20</span>%</div>"
            }).popover('show');
            $("#yangqi").html(values.yangqi);
            setTimeout(function(){
            	$(".popoversView2").popover("destroy");
            },2000);
        }
        $(".popoversView2").on("click",function(){
            popoversView2Click();
        })
        
        
        function popoversView3Click(){
        	$(".popoversView3").popover({
                html:true,
                animation:false,
                content:"<div>温度:<span id='wendu'>12</span>&#8451<br/>湿度:<span id='shidu'>12</span>%</div>"
            }).popover('show');
            $("#wendu").html(values.wendu);
            $("#shidu").html(values.shidu);
            setTimeout(function(){
            	$(".popoversView3").popover("destroy");
            },2000)
        }
        $(".popoversView3").on("click",function(){
            popoversView3Click();
        })
        
        //更改电灯开关的状态
        function popoversSwitchClick(){
        	var deviceNow="guang2";
        	var imgsrc=(switchState[deviceNow]==1?"resources/PicFile/kai.png":"resources/PicFile/guan.png");
        	$(".popoversSwitch").popover({
            	html:true,
            	animation:true,
                content:"<img src='"+imgsrc+"' style='width:100px;height:60px;cursor:pointer;' onclick='switchEvent(this)' class='guang2switch'>",
                placement:"bottom",
            }).popover("show");
        	$(".dengswitch").attr("src",imgsrc);
            setTimeout(function(){
            	$(".popoversSwitch").popover("destroy");
            },3000);
        }
        $(".popoversSwitch").on("click",function(){
        	/* if(checked){
        		popoversSwitchClick();
        	}else{ */
	        	fun=popoversSwitchClick;
	        	checkControl();
        	/* } */
        })
          
        //开关的popovers初始化
        
        function popoversClick(obj){
        	var deviceNow=$(obj).find("img").attr("class");
            var imgsrc=(switchState[deviceNow]==1?"resources/PicFile/kai.png":"resources/PicFile/guan.png");
            var thisobj=obj;
            if(deviceNow=="shuibeng9"||deviceNow=="shuibeng10"){
	            $(obj).popover({
	            	html:true,
	            	animation:true,
	                content:"<span>手自动：</span><input id='sbType' type='button' style='border:none;width:40px;' value='"+sbtype+"' onclick='changesbType(this.value)'><br/>\
	                <span>当前液位：</span><input id='ywlevel' type='button' disabled='disabled' style='border:none;width:30px;' value='"+ywlevel+"'>cm<br/>\
	                <img src='"+imgsrc+"' style='width:100px;height:60px;cursor:pointer;' onclick='switchEvent(this)' class='"+deviceNow+"switch"+"'>",
	                placement:"top",
	            }).popover("show");
            }else if(deviceNow=="fengji2"){
            	$(obj).popover({
	            	html:true,
	            	animation:true,
	                content:"<span>手自动：</span><input id='fjType' type='button' style='border:none;width:40px;' value='"+fjtype+"' onclick='changefjType(this.value)'><br/>\
	                <img src='"+imgsrc+"' style='width:100px;height:60px;cursor:pointer;' onclick='switchEvent(this)' class='"+deviceNow+"switch"+"'>",
	                placement:"bottom",
	            }).popover("show");
            }else{
	            $(obj).popover({
	            	html:true,
	            	animation:true,
	                content:"<img src='"+imgsrc+"' style='width:100px;height:60px;cursor:pointer;' onclick='switchEvent(this)' class='"+deviceNow+"switch"+"'>",
	                placement:"bottom",
	            }).popover("show");
            }
            $("."+deviceNow+"switch").attr("src",imgsrc);
            setTimeout(function(){
            	$(thisobj).popover("destroy");
            },8000);
       	}
        $(".popovers").on("click",function(){
            /* $(".popovers").popover("destroy"); */
            /* if(checked){
            	popoversClick(this)
            }else{ */
	            fun=popoversClick;
	            checkControl(this);
            /* } */
        });
        
        
        function checkControl(obj){
        	layer.open({
            	type:0,
            	area:['400px','250px'],
            	shade:0,
            	title:'请输入控制密码',
            	content:'<div style="width:75%;margin:25px auto;">\
                            <label>控制密码<label><input type="password" id="checkCode" style="width:75%;line-height:25px;display:inline;margin:0 25%;">\
                         </div>',
                            /* <input type="button" id="Code" disabled style="width:125px;border:1px;height:36px;margin-left:10px;padding:5px 0 6px;">\ */
                btn1:["确认"],
            	yes:function(index){
            		var checked;
            		var code;
            		$.ajax({
            			url : "loginTwice",
    					cache : false,
    					async : false,
    					success:function(result){
    						code=result;
    					}
            		});
            		if($("#checkCode")[0].value==code){
            			checked=true;
	            		fun(obj);
            		layer.close(index);
            		}else{
            			alert("控制密码错误！");
            		}
	            	/* if($("#checkCode")[0].value==Code){
	            		layer.close(index);
	            		checked=true;
	            		fun(obj);
	            	}else{
	            		alert("wrong");
	            	} */
            	}
            });
            /* var Code="";
            for(var i=0;i<4;i++){
            	Code+=Math.floor(Math.random()*10);
            }
            $("#Code").attr("value",Code); */
        }
        function carback(){
       	 $.ajax({
       			url : "carback",
       			cache : false,
       			success : function(result) {
       				alert("小车开始后退");
       			}
       		});
       }
       function carstop(){
       	 $.ajax({
       			url : "carstop",
       			cache : false,
       			success : function(result) {
       				alert("小车停止了");
       			}
       		});
       }
       function cargo(){
       	 $.ajax({
       			url : "cargo",
       			cache : false,
       			success : function(result) {
       				alert("小车开始前进");
       			}
       		});
       }
       
       function doTrackScanning(){
    	   $.ajax({
      			url : "doTrackScanning",
      			cache : false,
      			success : function(result) {
      				alert("一键巡航开始");
      			}
      		});
       }
       function actionSelect(obj){
	    	if(obj.value=="轨迹扫描"){
	    		$.ajax({
	    			url : "doTrackScanning",
	    			cache : false,
	    			success : function(result) {
	    				alert("轨迹扫描开始！");
	    			}
	    		});
	    		}
	    }
       
       function changefjType(obj){
    		   fjtype=obj;
    	   $.ajax({
   			url : "changefjType?type="+encodeURI(encodeURI(fjtype)),
   			cache : false,
   			success : function(result) {
   				if(fjtype=="手动"){
   				document.getElementById("fjType").value="自动";
   				fjtype="自动";
   				}else{
   					document.getElementById("fjType").value="手动";
   					fjtype="手动";
   				}
   			}
   		});
       }
       
       function changesbType(obj){
    	   sbtype=obj;
    	   
    	   $.ajax({
   			url : "changesbType?type="+encodeURI(encodeURI(sbtype)),
   			cache : false,
   			success : function(result) {
   				if(sbtype=="手动"){
   				    document.getElementById("sbType").value="自动";
   				}else{
   					document.getElementById("sbType").value="手动";
   				}
   			}
   		});
       }
         //应急灯控制
         function emergLightControl(n){
             $.ajax({
                url : "updateData?str=guang3&n="+n,
                cache : false,
                async:false,
                success : function(result) {
                    if(n==1){
                       $('.guang3').show(); 
                    }else{
                        $(".guang3").hide();
                    }
                }

            });
         }

        function switchEvent(obj){
            var deviceNow=$(obj).attr("class").replace("switch","");
            if($(obj).attr("src")=="resources/PicFile/kai.png"){
                $.ajax({
        			url : "updateData?str="+deviceNow+"&n="+0,
        			cache : false,
                    async:false,
        			success : function(result) {
        				 $(obj).attr("src","resources/PicFile/guan.png");
        	                switchState[deviceNow]=0;
        	                if(deviceNow=="guang2"||deviceNow=="fengji1"||deviceNow=="fengji2"||deviceNow=="fengji3"||deviceNow=="fengji4"||deviceNow=="shuibeng9"||deviceNow=="shuibeng10"){
        	                    $('.'+deviceNow).hide();
        	                }else{
        	                    $('.'+deviceNow).attr("src","resources/PicFile/"+deviceNow+".png");
        	                }
        			}
        		
        		});
                if(deviceNow=="guang2"){
                    emergLightControl(1);
                    setTimeout(function(){emergLightControl(0)},1000*60);
                }

            }else{
            	$.ajax({
        			url : "updateData?str="+deviceNow+"&n="+1,
        			cache : false,
        			success : function(result) {
                $(obj).attr("src","resources/PicFile/kai.png");
                switchState[deviceNow]=1;
                if(deviceNow=="guang2"||deviceNow=="fengji1"||deviceNow=="fengji2"||deviceNow=="fengji3"||deviceNow=="fengji4"||deviceNow=="shuibeng9"||deviceNow=="shuibeng10"){
                    $('.'+deviceNow).attr("src","resources/PicFile/"+deviceNow+".gif");
                    $('.'+deviceNow).show();
                }else{
                    $('.'+deviceNow).attr("src","resources/PicFile/"+deviceNow+".gif");
                }
        			}
            	});
            }
        }
        
        
        window.onload=setInterval("checkAlarm()",1000*60);
        
        function checkAlarm(){
        		$.ajax({
        			url : "loadData",
        			cache : false,
        			success : function(result) {
        				for(var i=0;i<result.length;i++){
        					if(result[i].opcname=="DEMO.level_al"){
        						if(result[i].opcvalue=="true"){
        							alert("当前液位过高！");
        							/**
        							for(var i=0;i<result.length;i++){
        	        					if(result[i].opcname=="DEMO.level"){
        	        						var str = "液位过高";
        	        						var value = result[i].opcvalue;
        	        						$.ajax({
        	        						url : "addAlarmHistory?str="+encodeURI(encodeURI(str))+"&value="+value,
        	        	        			cache : false,
        	        	        			success : function(result) {
        	        	        				
        	        	        			}
        	        						});
        							}
        						}
        							**/
        					}
        					}
        					if(result[i].opcname=="DEMO.O2_al"){
        						if(result[i].opcvalue=="true"){
        							alert("当前氧气浓度过低！");
        							/**
        							for(var i=0;i<result.length;i++){
        	        					if(result[i].opcname=="DEMO.O2"){
        	        						var str = "氧气浓度过低";
        	        						var value = result[i].opcvalue;
        	        						$.ajax({
        	        						url : "addAlarmHistory?str="+encodeURI(encodeURI(str))+"&value="+value,
        	        	        			cache : false,
        	        	        			success : function(result) {
        	        	        				
        	        	        			}
        	        						});
        							}
        						}
        							**/
        						}
        					}
        					if(result[i].opcname=="DEMO.O2_hal"){
        						if(result[i].opcvalue=="true"){
        							alert("当前氧气浓度过高！");
        							/**
        							for(var i=0;i<result.length;i++){
        	        					if(result[i].opcname=="DEMO.O2"){
        	        						var str = "氧气浓度过高";
        	        						var value = result[i].opcvalue;
        	        						$.ajax({
        	        						url : "addAlarmHistory?str="+encodeURI(encodeURI(str))+"&value="+value,
        	        	        			cache : false,
        	        	        			success : function(result) {
        	        	        				
        	        	        			}
        	        						});
        							}
        						}
        							**/
        						}
        					}
        					if(result[i].opcname=="DEMO.temp1_al"){
        						if(result[i].opcvalue=="true"){
        							alert("当前温度过高！");
        							/**
        							for(var i=0;i<result.length;i++){
        	        					if(result[i].opcname=="DEMO.temp1"){
        	        						var str = "温度过高";
        	        						var value = result[i].opcvalue;
        	        						$.ajax({
        	        						url : "addAlarmHistory?str="+encodeURI(encodeURI(str))+"&value="+value,
        	        	        			cache : false,
        	        	        			success : function(result) {
        	        	        				
        	        	        			}
        	        						});
        							}
        						}
        							**/
        						}
        					}
        					if(result[i].opcname=="DEMO.wet1_al"){
        						if(result[i].opcvalue=="true"){
        							//alert("当前湿度过高！");
        							/**
        							for(var i=0;i<result.length;i++){
        	        					if(result[i].opcname=="DEMO.wet1"){
        	        						var str = "湿度过高";
        	        						var value = result[i].opcvalue;
        	        						$.ajax({
        	        						url : "addAlarmHistory?str="+encodeURI(encodeURI(str))+"&value="+value,
        	        	        			cache : false,
        	        	        			success : function(result) {
        	        	        				
        	        	        			}
        	        						});
        							}
        						}
        							**/
        						}
        					}
        					if(result[i].opcname=="DEMO.krqt_al"){
        						if(result[i].opcvalue=="true"){
        							alert("当前可燃气体浓度过高！");
        							/**
        							for(var i=0;i<result.length;i++){
        	        					if(result[i].opcname=="DEMO.krqt"){
        	        						var str = "可燃气体浓度过高";
        	        						var value = result[i].opcvalue;
        	        						$.ajax({
        	        						url : "addAlarmHistory?str="+encodeURI(encodeURI(str))+"&value="+value,
        	        	        			cache : false,
        	        	        			success : function(result) {
        	        	        				
        	        	        			}
        	        						});
        							}
        						}
        							**/
        						}
        					}
        				}
        			}
        			});
        }
        
        jQuery(function($) {
        	var grid_selector = "#grid-table";
    		var pager_selector = "#grid-pager";
    		
    		var parent_column = $(grid_selector).closest('[class*="col-"]');
    		//resize to fit page size
    		$(window).on('resize.jqGrid', function () {
    			$(grid_selector).jqGrid( 'setGridWidth', parent_column.width() );
    	    })
    		
    		//resize on sidebar collapse/expand
    		$(document).on('settings.ace.jqGrid' , function(ev, event_name, collapsed) {
    			if( event_name === 'sidebar_collapsed' || event_name === 'main_container_fixed' ) {
    				//setTimeout is for webkit only to give time for DOM changes and then redraw!!!
    				setTimeout(function() {
    					$(grid_selector).jqGrid( 'setGridWidth', parent_column.width() );
    				}, 0);
    			}
    	    })
    	    
    	    jQuery(grid_selector).jqGrid({
    	    	url:"loadAlarmHistory",
    			datatype: "json",
    			height: 358,
    			colNames:['id','报警类型','当前数值', '报警时间'],
    			colModel:[
    						{name:'id',index:'id',editable:true,hidden:true},
    						{name:'name',index:'name',editable: false},
    						{name:'value',index:'value',editable: false},
    						{name:'time',index:'time',editable: false}
    						
    					], 
    			
    					viewrecords : true,
    					rowNum:10,
    					rowList:[10,20,30],
    					pager : pager_selector,
    					altRows: true,
    					//toppager: true,
    					
    					multiselect: true,
    					//multikey: "ctrlKey",
    			        multiboxonly: true,
    			
    					loadComplete : function() {
    						var table = this;
    						setTimeout(function(){
    							styleCheckbox(table);
    							
    							updateActionIcons(table);
    							updatePagerIcons(table);
    							enableTooltips(table);
    						}, 0);
    					},
    			
    					editurl: "",//nothing is savedw
    					caption: "报警记录"
    			
    					//,autowidth: true,
    			
    			
    					/**
    					,
    					grouping:true, 
    					groupingView : { 
    						 groupField : ['name'],
    						 groupDataSorted : true,
    						 plusicon : 'fa fa-chevron-down bigger-110',
    						 minusicon : 'fa fa-chevron-up bigger-110'
    					},
    					caption: "Grouping"
    					*/
    			
    				});
    				$(window).triggerHandler('resize.jqGrid');//trigger window resize to make the grid get the correct size
    				
    				function aceSwitch( cellvalue, options, cell ) {
    					setTimeout(function(){
    						$(cell) .find('input[type=checkbox]')
    							.addClass('ace ace-switch ace-switch-5')
    							.after('<span class="lbl"></span>');
    					}, 0);
    				}
    				//enable datepicker
    				function pickDate( cellvalue, options, cell ) {
    					setTimeout(function(){
    						$(cell) .find('input[type=text]')
    								.datepicker({format:'yyyy-mm-dd HH:MM:ss' , autoclose:true}); 
    					}, 0);
    				}
    				
    				jQuery(grid_selector).jqGrid('navGrid',pager_selector,
    						{ 	//navbar options
    							edit: false,
    							editicon : 'ace-icon fa fa-pencil blue',
    							add: false,
    							addicon : 'ace-icon fa fa-plus-circle purple',
    							del: false,
    							delicon : 'ace-icon fa fa-trash-o red',
    							search: false,
    							searchicon : 'ace-icon fa fa-search orange',
    							refresh: true,
    							refreshicon : 'ace-icon fa fa-refresh green',
    							view: true,
    							viewicon : 'ace-icon fa fa-search-plus grey',
    						},
    						{
    							//delete record form
    							recreateForm: true,
    							beforeShowForm : function(e) {
    								var form = $(e[0]);
    								if(form.data('styled')) return false;
    								
    								form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />')
    								style_delete_form(form);
    								
    								form.data('styled', true);
    							},
    							onClick : function(e) {
    								//alert(1);
    							}
    						},
    						{
    							//search form
    							recreateForm: true,
    							afterShowSearch: function(e){
    								var form = $(e[0]);
    								form.closest('.ui-jqdialog').find('.ui-jqdialog-title').wrap('<div class="widget-header" />')
    								style_search_form(form);
    							},
    							afterRedraw: function(){
    								style_search_filters($(this));
    							}
    							,
    							multipleSearch: true,
    							/**
    							multipleGroup:true,
    							showQuery: true
    							*/
    						},
    						{
    							//view record form
    							recreateForm: true,
    							beforeShowForm: function(e){
    								var form = $(e[0]);
    								form.closest('.ui-jqdialog').find('.ui-jqdialog-title').wrap('<div class="widget-header" />')
    							}
    						}
    					)
    				
    				
    					
    					function style_edit_form(form) {
    								   //don't wrap inside a label element, the checkbox value won't be submitted (POST'ed)
    								  //.addClass('ace ace-switch ace-switch-5').wrap('<label class="inline" />').after('<span class="lbl"></span>');
    				
    								
    						//update buttons classes
    						var buttons = form.next().find('.EditButton .fm-button');
    						buttons.addClass('btn btn-sm').find('[class*="-icon"]').hide();//ui-icon, s-icon
    						buttons.eq(0).addClass('btn-primary').prepend('<i class="ace-icon fa fa-check"></i>');
    						buttons.eq(1).prepend('<i class="ace-icon fa fa-times"></i>')
    						
    						buttons = form.next().find('.navButton a');
    						buttons.find('.ui-icon').hide();
    						buttons.eq(0).append('<i class="ace-icon fa fa-chevron-left"></i>');
    						buttons.eq(1).append('<i class="ace-icon fa fa-chevron-right"></i>');		
    					}
    				
    					function style_delete_form(form) {
    						var buttons = form.next().find('.EditButton .fm-button');
    						buttons.addClass('btn btn-sm btn-white btn-round').find('[class*="-icon"]').hide();//ui-icon, s-icon
    						buttons.eq(0).addClass('btn-danger').prepend('<i class="ace-icon fa fa-trash-o"></i>');
    						buttons.eq(1).addClass('btn-default').prepend('<i class="ace-icon fa fa-times"></i>')
    					}
    					
    					function style_search_filters(form) {
    						form.find('.delete-rule').val('X');
    						form.find('.add-rule').addClass('btn btn-xs btn-primary');
    						form.find('.add-group').addClass('btn btn-xs btn-success');
    						form.find('.delete-group').addClass('btn btn-xs btn-danger');
    					}
    					function style_search_form(form) {
    						var dialog = form.closest('.ui-jqdialog');
    						var buttons = dialog.find('.EditTable')
    						buttons.find('.EditButton a[id*="_reset"]').addClass('btn btn-sm btn-info').find('.ui-icon').attr('class', 'ace-icon fa fa-retweet');
    						buttons.find('.EditButton a[id*="_query"]').addClass('btn btn-sm btn-inverse').find('.ui-icon').attr('class', 'ace-icon fa fa-comment-o');
    						buttons.find('.EditButton a[id*="_search"]').addClass('btn btn-sm btn-purple').find('.ui-icon').attr('class', 'ace-icon fa fa-search');
    					}
    					
    					function beforeDeleteCallback(e) {
    						var form = $(e[0]);
    						if(form.data('styled')) return false;
    						
    						form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />')
    						style_delete_form(form);
    						
    						form.data('styled', true);
    					}
    					
    					function beforeEditCallback(e) {
    						var form = $(e[0]);
    						form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />')
    						style_edit_form(form);
    					}
    				
    				
    				
    					//it causes some flicker when reloading or navigating grid
    					//it may be possible to have some custom formatter to do this as the grid is being created to prevent this
    					//or go back to default browser checkbox styles for the grid
    					function styleCheckbox(table) {
    					/**
    						$(table).find('input:checkbox').addClass('ace')
    						.wrap('<label />')
    						.after('<span class="lbl align-top" />')
    				
    				
    						$('.ui-jqgrid-labels th[id*="_cb"]:first-child')
    						.find('input.cbox[type=checkbox]').addClass('ace')
    						.wrap('<label />').after('<span class="lbl align-top" />');
    					*/
    					}
    					
    				
    					//unlike navButtons icons, action icons in rows seem to be hard-coded
    					//you can change them like this in here if you want
    					function updateActionIcons(table) {
    						/**
    						var replacement = 
    						{
    							'ui-ace-icon fa fa-pencil' : 'ace-icon fa fa-pencil blue',
    							'ui-ace-icon fa fa-trash-o' : 'ace-icon fa fa-trash-o red',
    							'ui-icon-disk' : 'ace-icon fa fa-check green',
    							'ui-icon-cancel' : 'ace-icon fa fa-times red'
    						};
    						$(table).find('.ui-pg-div span.ui-icon').each(function(){
    							var icon = $(this);
    							var $class = $.trim(icon.attr('class').replace('ui-icon', ''));
    							if($class in replacement) icon.attr('class', 'ui-icon '+replacement[$class]);
    						})
    						*/
    					}
    					
    					//replace icons with FontAwesome icons like above
    					function updatePagerIcons(table) {
    						var replacement = 
    						{
    							'ui-icon-seek-first' : 'ace-icon fa fa-angle-double-left bigger-140',
    							'ui-icon-seek-prev' : 'ace-icon fa fa-angle-left bigger-140',
    							'ui-icon-seek-next' : 'ace-icon fa fa-angle-right bigger-140',
    							'ui-icon-seek-end' : 'ace-icon fa fa-angle-double-right bigger-140'
    						};
    						$('.ui-pg-table:not(.navtable) > tbody > tr > .ui-pg-button > .ui-icon').each(function(){
    							var icon = $(this);
    							var $class = $.trim(icon.attr('class').replace('ui-icon', ''));
    							
    							if($class in replacement) icon.attr('class', 'ui-icon '+replacement[$class]);
    						})
    					}
    				
    					function enableTooltips(table) {
    						$('.navtable .ui-pg-button').tooltip({container:'body'});
    						$(table).find('.ui-pg-div').tooltip({container:'body'});
    					}
    					
    					//var selr = jQuery(grid_selector).jqGrid('getGridParam','selrow');
    				
    					$(document).one('ajaxloadstart.page', function(e) {
    						$.jgrid.gridDestroy(grid_selector);
    						$('.ui-jqdialog').remove();
    					});
        });
    </script>
    <!-- WebGL threejs -->
</body>
</html>
